﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="UserInfo.aspx.cs" Inherits="App.User_UserInfo" ValidateRequest="false" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<%@ Register Src="~/UserControl/Top.ascx" TagPrefix="UC" TagName="top" %>
<%@ Register Src="~/UserControl/Footer.ascx" TagPrefix="UC" TagName="footer" %>
<%@ Register Src="~/UserControl/lunboPic.ascx" TagPrefix="UC" TagName="lb" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>上善若水 --不言、无为、自强不息</title>
    <link type="text/css" href="../Styles/layout.css" rel="Stylesheet" />
    <link type="text/css" href="../Styles/theme1.css" rel="Stylesheet" />
    <link type="text/css" href="../Styles/style.css" rel="Stylesheet" />
    <link type="text/css" href="../Styles/regstyle.css" rel="Stylesheet" />
    <link type="text/css" href="../Scripts/UIModule/jquery-ui-1.8.16.custom.css" rel="Stylesheet" />
    <script type="text/javascript" src="../Scripts/carouFredSel-6.2.1/jquery-1.8.2.min.js"></script>
    <script type="text/javascript" src="../Scripts/carouFredSel-6.2.1/jquery.carouFredSel-6.2.1.js"></script>
    <script type="text/javascript" src="../Scripts/editor/kindeditor.js"></script>
    <script type="text/javascript" src="../Scripts/UIModule/jquery-ui-1.8.16.custom.min.js"></script>
    <script type="text/javascript" src="../Scripts/plugs_object.js"></script>
    <script src="../Scripts/jquery.json-2.2.js" type="text/javascript"></script>
    <style>
        .shell
        {
            background: no-repeat 4px 5px;
            border: 1px solid #aaa;
            width: 305px;
            padding: 3px 2px 2px 20px;
        }
        .shell2
        {
            background: no-repeat 4px 5px;
            border: 1px solid #aaa;
            width: 260px;
            padding: 3px 2px 2px 20px;
        }
        .view
        {
            margin: 10px auto;
            min-height: 300px;
            padding: 0 10px;
            width: 95%;
        }
        
        .view .detailT
        {
            color: rgb(0, 0, 0);
            font-size: 22px;
            font-weight: bold;
            margin: 20px auto 10px;
            text-align: center;
        }
        
        .view .data
        {
            border-bottom: 1px solid rgb(204, 204, 204);
            line-height: 17px;
            padding-bottom: 5px;
            text-align: center;
        }
        
        
        .view .content
        {
            color: rgb(0, 0, 0);
            font-size: 14px;
            line-height: 24px;
            margin-top: 0;
            padding-top: 10px;
            text-align: justify;
        }
        
        
        .view .content p
        {
            color: rgb(0, 0, 0);
            font-size: 14px;
            line-height: 24px;
        }
        #div7
        {
            height: 70px;
            overflow: hidden;
        }
    </style>
    <script>
        function scoll(id) {
            var box = document.getElementById(id);
            var can = true;
            box.innerHTML += box.innerHTML;
            box.onmouseover = function () { can = false };
            box.onmouseout = function () { can = true };
            new function () {
                var stop = box.scrollTop % 18 == 0 && !can;
                var t;
                if (!stop)
                    box.scrollTop == parseInt(box.scrollHeight / 2) ? box.scrollTop = 0 : box.scrollTop++;
                t = setTimeout(arguments.callee, box.scrollTop % 18 ? 10 : 1500);

            };
        }
        $(function () {

            $('#div1').carouFredSel({
                items: 7,
                direction: "up",
                scroll: {
                    items: 1,
                    easing: "elastic",
                    duration: 1000,
                    pauseOnHover: true
                }
            });
            $('#div2').carouFredSel({
                items: 7,
                direction: "up",
                scroll: {
                    items: 1,
                    easing: "elastic",
                    duration: 1000,
                    pauseOnHover: true
                }
            });
            //生日    
            $("#div_setPassword").hide();
//            setTimeout(controlARSDiv, 5000);
        }
);
        //绑定城市信息
        function bindCity() {
            if ($("#DDL_national>option:selected").val() != "-1" && $("#DDL_province>option:selected").val() != "-1") {
                $.post("../JSPost/Check.aspx", { "action": "getCity",
                    "provinceid": $("#DDL_province>option:selected").val()
                }, function (res) {
                    if (res != "-1") {
                        var data = $.evalJSON(res);
                        $("#DDL_city>option").remove();
                        for (var i = 0; i < data.length; i++) {
                            var option = $("<option></option>");
                            option.val(data[i]["AreaCode"]);
                            option.text(data[i]["AreaName"]);
                            $("#DDL_city").append(option);
                        };
                    }
                });
            }
        }
        var arsDiv;
        function controlARSDiv() {
            if (!$('#divAnnouncement_conent').is(":hidden")) {
                showSuggestionDiv();
            }
//            else if (!$('#divReward_content').is(":hidden")) {
//                showSuggestionDiv();
//            }
            else if (!$('#divSuggestion_content').is(":hidden")) {
                showAnnouncementDiv();
            }
            arsDiv = setTimeout(controlARSDiv, 5000);
        }
        function stoparsDiv() {
            clearTimeout(arsDiv);
        }
        function showAnnouncementDiv() {

            $('#divAnnouncement_conent').show();
            $('#AliAnnouncement').css("background", "")
            $('#AliAnnouncement').css("background", "none repeat scroll 0 0 #12B5B0");

//            $('#divReward_content').hide();
            $('#AliReward').css("background", "");
            $('#AliReward').css("background", "none repeat scroll 0 0 rgb(163, 200, 253)");

            $('#divSuggestion_content').hide();
            $('#AliSuggestion').css("background", "");
            $('#AliSuggestion').css("background", "none repeat scroll 0 0 rgb(163, 200, 253)");

        }

        function showRewardDiv() {

//            $('#divReward_content').show();
            $('#AliReward').css("background", "");
            $('#AliReward').css("background", "none repeat scroll 0 0 #12B5B0");

            $('#divAnnouncement_conent').hide();
            $('#AliAnnouncement').css("background", "");
            $('#AliAnnouncement').css("background", "none repeat scroll 0 0 rgb(163, 200, 253);");
            $('#divSuggestion_content').hide();
            $('#AliSuggestion').css("background", "");
            $('#AliSuggestion').css("background", "none repeat scroll 0 0 rgb(163, 200, 253)");
        }

        function showSuggestionDiv() {

            $('#divSuggestion_content').show();
            $('#AliSuggestion').css("background", "");
            $('#AliSuggestion').css("background", "none repeat scroll 0 0 #12B5B0");
            $('#divAnnouncement_conent').hide();
            $('#AliAnnouncement').css("background", "");
            $('#AliAnnouncement').css("background", "none repeat scroll 0 0 rgb(163, 200, 253);");
//            $('#divReward_content').hide();
            $('#AliReward').css("background", "");
            $('#AliReward').css("background", "none repeat scroll 0 0 rgb(163, 200, 253);");
        }


        //检查旧密码
        function checkOldPassword() {
            var val = $('#txt_oldpassword').val();
            var result = true;
            $.ajax({
                url: "../JSPost/Check.aspx",
                type: "POST",
                async: false,
                data: { "action": "checkOldpPssword", "value": val },
                success: function (data, status) {
                    if (status == "success") {
                        if (data == 1) {
                            $('#span_oldPw').text('');
                            result = true;
                        } else {
                            $('#span_oldPw').text(data);
                            result = false;
                        }
                    }
                }
            });
            return result;
        }
        //检查新密码
        function checkNewPassword() {
            var val = $('#txt_newPassword').val();
            if (val.length < 1) {
                $('#span_newPw').text("密码不能为空");
                return false;
            } else {
                $('#span_newPw').text('');
                return true;
            }
        }
        //检查确认密码
        function checkSurePassword() {
            var val = $('#txt_surepassword').val();
            var newVal = $('#txt_newPassword').val();
            if (val.length < 1) {
                $('#span_surePw').text("密码不能为空");
                return false;
            } else if (val != newVal) {
                $('#span_surePw').text("两次输入的密码不一致");
                return false;
            } else {
                $('#span_surePw').text('');
                return true;
            }
        }
        //确认按钮，所有密码check
        function checkAllPassword() {
            if (!checkOldPassword()) {
                return false;
            }
            if (!checkNewPassword()) {
                return false;
            }
            if (!checkSurePassword()) {
                return false;
            }
            return true;
        }

        function changeInfo() {
            if ($("#divUserInfo").is(":hidden")) {
                $("#divUserInfo").show();
                $("#divInfo").html("-");
            }
            else {
                $("#divUserInfo").hide();
                $("#divInfo").html("+");
            }
        }

        function changePW() {
            if ($("#div_setPassword").is(":hidden")) {
                $("#div_setPassword").show();
                $("#divPW").html("-");
            }
            else {
                $("#div_setPassword").hide();
                $("#divPW").html("+");
            }
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div class="bjtu">
    </div>
    <!--背景图-->
    <div id="page">
        <div class="main">
            <!--导航-->
            <!--内容-->
            <div class="box">
                <!--cc-->
                <div class="cc">
                    <span class="ctl"></span><span class="ctr"></span>
                    <!--头部-->
                    <UC:top ID="top" runat="server" />
                    <!--categoryleft-->
                    <div class="categoryleft">                        
                        <UC:lb  ID="lunbo" runat="server"/>
                    </div>
                    <!--categoryleft-->
                    <!--categoryright-->
                    <div class="categoryright">
                        <div id="divRightWelcome">
                            <script type="text/javascript" src="../Player/ckplayer.js" charset="utf-8"></script>
                            <script type="text/javascript">
                                var flashvars = { f: '../Player/MyDream.flv', c: 0, b: 1, p: 0, e: 0 };
                                var params = { bgcolor: '#FFF', allowFullScreen: true, allowScriptAccess: 'always' };
                                CKobject.embedSWF('../Player/ckplayer.swf', 'divRightWelcome', 'ckplayer_a1', '290', '230', flashvars, params);
                                /* CKobject.embedSWF(播放器路径,容器id,播放器id/name,播放器宽,播放器高,flashvars的值,其它定义也可省略); 下面三行是调用html5播放器用到的 */
                                var video = ['../Player/MyDream.flv-&gt;flv-application/octet-stream'];
                                var support = ['iPad', 'iPhone', 'ios', 'android+false', 'msie10+false', 'webKit'];
                                CKobject.embedHTML5('video', 'ckplayer_a1', 600, 400, video, flashvars, support); 
                            </script>
                        </div>
                        <!--categoryright-->
                        <!--版权-->
                        <!--版权-->
                        <span class="cbl"></span><span class="cbr"></span>
                    </div>
                    <%-- 内容 --%>
                    <div style="width: 98%; margin-left: 15px; margin-top: 15px; float: left;" >
                        <div style="-moz-border-bottom-colors: none; -moz-border-left-colors: none; -moz-border-right-colors: none;
                            -moz-border-top-colors: none; border-color: rgb(222, 222, 222); border-image: none;
                            border-style: solid; border-width: 1px 1px 2px; height: 28px; width: 100%; background-color: rgb(234, 239, 242);"onclick="changeInfo()" >
                            个人信息</div>
                            <div style="display: inline; float: right; margin-right: 10px; margin-top: -30px; font-size:25px; color:Red;" id="divInfo">
                                    -
                                </div>
                        <div class="reg_con" id="divUserInfo" runat="server">
                            <ul class="reglist">
                                <li class="blank15"></li>
                                <li>
                                    <div class="reg_column reg_column_01">
                                        <label>
                                            昵称 ：</label>
                                    </div>
                                    <div class="reg_column reg_column_01">
                                        <asp:TextBox runat="server" ID="txt_nickName" MaxLength="16" autocomplete="off" onblur="checkNickName(this)"></asp:TextBox>
                                    </div>
                                    <div class="reg_column reg_column_01">
                                        <span id="userNameReError" style="display: none;"><span class="error">
                                            <img src="../images/regerror.gif" /></span> <span class="errortxt">昵称已注册，请重新输入 </span>
                                        </span><span id="userNameError" style="display: none;"><span class="error">
                                            <img src="../images/regerror.gif" /></span> <span class="errortxt">昵称输入不合法 </span>
                                        </span>
                                    </div>
                                </li>
                                <li>
                                    <div class="reg_column reg_column_01">
                                        <label>
                                            真实姓名 ：</label>
                                    </div>
                                    <div class="reg_column reg_column_01">
                                        <asp:TextBox runat="server" ID="txt_realName" MaxLength="16" autocomplete="off" onblur="checkNickName(this)"></asp:TextBox>
                                    </div>
                                </li>
                                <li>
                                    <div class="reg_column reg_column_01">
                                        <label>
                                            邮箱：</label>
                                    </div>
                                    <div class="reg_column reg_column_01">
                                        <asp:TextBox runat="server" ID="txt_email" MaxLength="64" onblur="checkMail(this);"
                                            autocomplete="off"></asp:TextBox><font color="red"> * </font>
                                    </div>
                                    <div class="reg_column reg_column_01">
                                        <span id="emailReNameError" style="display: none"><span class="error">
                                            <img src="../images/regerror.gif" /></span> <span class="errortxt">此邮箱已被注册 </span>
                                        </span><span id="emailFormatError" style="display: none"><span class="error">
                                            <img src="../images/regerror.gif" /></span> <span class="errortxt">邮箱格式不正确 </span>
                                        </span><span id="emailNullError" style="display: none"><span class="error">
                                            <img src="../images/regerror.gif" /></span> <span class="errortxt">邮箱不能为空 </span>
                                        </span>
                                    </div>
                                </li>
                                <li id="liIdCardNum" runat="server">
                                    <div class="reg_column reg_column_01">
                                        <label>
                                            有效证件号码：</label>
                                    </div>
                                    <div class="reg_column reg_column_01">
                                        <asp:TextBox runat="server" ID="txt_IdNum" MaxLength="64" autocomplete="off"></asp:TextBox>
                                    </div>
                                    <div class="reg_column reg_column_01">
                                        <span id="IdNumErr" style="display: none"><span class="error">
                                            <img src="../images/regerror.gif" /></span> <span class="errortxt">有效证件号码不能为空 </span>
                                        </span>
                                    </div>
                                </li>
                                <li id="liImgLable" runat="server">
                                    <div class="reg_column reg_column_01">
                                        <label>
                                            有效证件照：</label>
                                    </div>
                                    <div class="reg_column reg_column_01">
                                        <img id="img_Photo" runat="server" style="width:300px;" />
                                    </div>
                                </li>
                                <li id="liUploadImg" runat="server">
                                    <div class="reg_column reg_column_01">
                                        <label>
                                            重新上传有效证件照：</label>
                                    </div>
                                    <div class="reg_column reg_column_01">
                                        <asp:FileUpload ID="file" runat="server" />
                                    </div>
                                </li>
                                <li>
                                    <div class="reg_column reg_column_01">
                                        <label>
                                            手机号：</label>
                                    </div>
                                    <div class="reg_column reg_column_01">
                                        <asp:TextBox runat="server" ID="txt_PhoneNumber" MaxLength="64" onblur="checkPhone(this);"
                                            autocomplete="off"></asp:TextBox>
                                    </div>
                                    <div class="reg_column reg_column_01">
                                        <span id="PhoneNumberError" style="display: none"><span class="error">
                                            <img src="../images/regerror.gif" /></span> <span class="errortxt">请输入正确的移动电话 </span>
                                        </span><span id="PhoneNumberNullError" style="display: none"><span class="error">
                                            <img src="../images/regerror.gif" /></span> <span class="errortxt">移动电话不能为空 </span>
                                        </span><span id="PhoneNumberExist" style="display: none"><span class="error">
                                            <img src="../images/regerror.gif" /></span> <span class="errortxt">手机号已注册过，请重新输入！
                                            </span></span>
                                    </div>
                                </li>
                                <li>
                                    <div class="reg_column reg_column_01">
                                        <label>
                                            出生日期：</label>
                                    </div>
                                    <div class="reg_column reg_column_01">
                                        <asp:TextBox ID="txt_birthday" runat="server" CssClass="birthday" Style="ime-mode: disabled"
                                            onkeypress="noInput(event)"></asp:TextBox>
                                    </div>
                                </li>
                                <li>
                                    <div class="reg_column reg_column_01">
                                        <label>
                                            所在地 ：</label>
                                    </div>
                                    <div class="reg_column reg_column_02">
                                        <table style="border: none; width:100%;">
                                            <tr style="width:100%;">
                                                <td style="border: none;">
                                                    <asp:DropDownList ID="DDL_province" class="reg_select" runat="server" onchange="bindCity()">
                                                    </asp:DropDownList>
                                                </td>
                                                <td style="border: none;">
                                                    <span class="threesel">省 </span>
                                                </td>
                                                <td style="border: none;">
                                                    <asp:DropDownList ID="DDL_city" class="reg_select" runat="server">
                                                    </asp:DropDownList>
                                                </td>
                                                <td style="border: none;">
                                                    <span class="threesel">市 </span>
                                                </td>
                                                <td style="border: none;">
                                                    <font style="color: Red;">*</font>
                                                </td>
                                            </tr>
                                        </table>
                                    </div>
                                    <div class="reg_column reg_column_01">
                                        <label>
                                            &nbsp;</label>
                                    </div>
                                </li>
                                <li>
                                    <div class="reg_column reg_column_01">
                                        <label>
                                            家庭住址：</label>
                                    </div>
                                    <div class="reg_column reg_column_01">
                                        <asp:TextBox ID="txt_adress" runat="server"></asp:TextBox>
                                    </div>
                                </li>
                                <li>
                                    <div style="width: 100px; margin-left: 155px;">
                                        <a id="btn_submitUserInfo" class="funcbtn" validationgroup="2" runat="server" onServerclick="btn_submitUserInfo_ServerClick"
                                            style="margin: 10px 0px 20px 230px;">提交</a>
                                    </div>
                                </li>
                            </ul>
                        </div>
                    </div>
                    <div style="width: 98%; margin-left: 15px; margin-top: 15px; float: left;" id="divChangePW" runat="server" >
                        <div style="-moz-border-bottom-colors: none; -moz-border-left-colors: none; -moz-border-right-colors: none;
                            -moz-border-top-colors: none; border-color: rgb(222, 222, 222); border-image: none;
                            border-style: solid; border-width: 1px 1px 2px; height: 28px; width: 100%; background-color: rgb(234, 239, 242);" onclick="changePW()">
                            修改密码</div>
                            <div style="display: inline; float: right; margin-right: 10px; margin-top: -30px; font-size:25px; color:Red;" id="divPW">
                                    +
                                </div>
                            <div class="new_mystable" id="div_setPassword" style="*width: 500px;">
                                    <table class="con_div" style="margin-left: 147px;">
                                        <tr>
                                            <td>
                                            </td>
                                            <td>
                                                <asp:Label ID="lbl_userpassword" runat="server" Text="" ForeColor="Red" /></td>
                                            <td>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="tdcol1">
                                                <div class="td_column_02">
                                                   原密码：                                                    
                                                </div>
                                            </td>
                                            <td>
                                                <asp:TextBox ID="txt_oldpassword" runat="server" TextMode="Password" onblur="checkOldPassword();"></asp:TextBox>
                                                <span id="span_oldPw" style="color: Red"></span>
                                            </td>
                                            <td>
                                                
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="tdcol1">
                                                <div class="td_column_02">
                                                    新密码：
                                                    <%--新密码--%>
                                                </div>
                                            </td>
                                            <td>
                                                <asp:TextBox ID="txt_newPassword" runat="server" TextMode="Password" onblur="checkNewPassword();"></asp:TextBox>
                                                <span id="span_newPw" style="color: Red"></span>
                                            </td>
                                            <td>
                                               <%-- <span class="hint">
                                                    <%=LanguageHelper.GetLabel("User.NewPasswordHelp", AppAuthHelper.CurrentLanguage)%>
                                                    <%--请输入现在您要修改的密码--%>
                                                <%--<span class="hint-pointer">&nbsp;</span></span> &nbsp;--%>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="tdcol1">
                                                <div class="td_column_02">
                                                    确认密码：
                                                    <%--确认密码--%>
                                                </div>
                                            </td>
                                            <td>
                                                <asp:TextBox ID="txt_surepassword" runat="server" TextMode="Password" onblur="checkSurePassword();"></asp:TextBox>
                                                <span id="span_surePw" style="color: Red"></span>
                                            </td>
                                            <td>
                                                <%--
                                                <span class="hint">
                                                    <%=LanguageHelper.GetLabel("User.RePasswordHelp", AppAuthHelper.CurrentLanguage)%>
                                                    <%--请再次输入你现在修改的密码--%>
                                                <%--<span class="hint-pointer">&nbsp;</span></span> &nbsp;--%>
                                            </td>
                                        </tr>
                                    </table>
                                    <asp:LinkButton ID="btn_submitPassword" runat="server" class="funcbtn" OnClientClick="return checkAllPassword();"
                                        OnClick="btn_submitPassword_ServerClick" Style="margin: 10px 0px 20px 360px;">提交</asp:LinkButton>
                                </div>
                    </div>
                    <div id="divJS" runat="server">
                    </div>
                    <UC:footer ID="footer" runat="server" />
                    <%-- <div class="footer">
                        <a href="mailTo:123@123.COM">联系我们</a>|
                       <a id="pp" target="_blank" runat="server">隐私声明</a>|
                      <a id="tc" target="_blank" runat="server">条款与条件</a>| 
                      <a id="help" target="_blank" runat="server">帮助</a>
                     </div>--%>
                    <!--cc-->
                    <span class="cbl"></span><span class="cbr"></span>
                    <asp:HiddenField ID="hf_PaperId" runat="server" />
                </div>
            </div>
            <span class="bl"></span>
            <div class="bc">
            </div>
            <span class="br"></span>
            <!--box-->
        </div>
        <!--main-->
    </div>
    </form>
</body>
</html>
